<!-- 
  @Created by pangzg pangzg2@yusys.com.cn on 2020-4-13 13:56:49.
  @updated by
  @description 联系人管理
-->
<div>
  <yu-panel title="任务组管理">
    <yu-xform related-table-name="refTable" form-type="search">
      <yu-xform-group :column="4">
        <yu-xform-item label="应用模块" placeholder="应用模块" ctype="input" name="appModule"></yu-xform-item>
      </yu-xform-group>
    </yu-xform>
    <yu-toolBar>
      <yu-button @click="addFn" v-if="addFnButton">新增</yu-button>
      <yu-button @click="modifyFn" v-if="updateFnButton">修改</yu-button>
      <yu-button @click="deleteFn" v-if="deleteFnButton">删除</yu-button>
      <yu-button @click="relFn" v-if="relFnButton">任务管理规则</yu-button>
    </yu-toolBar>
    <yu-xtable ref="refTable" row-number :data-url="dataUrl" selection-type="radio" >
      <yu-xtable-column label="应用模块" prop="appModule"></yu-xtable-column>
      <yu-xtable-column label="应用条线" prop="appLine"></yu-xtable-column>
      <yu-xtable-column label="时效" prop="addDay"></yu-xtable-column>
      <yu-xtable-column label="截止时间" prop="endTime"></yu-xtable-column>
      <yu-xtable-column label="备注" prop="remark"></yu-xtable-column>
	  <yu-xtable-column label="更新人" prop="updateUser"></yu-xtable-column>
	  <yu-xtable-column label="更新时间" prop="updateTimeStr"></yu-xtable-column>
    </yu-xtable>
  </yu-panel>
  <yu-dialog :title="viewTitle" :visible.sync="dialogVisible">
    <yu-xform ref="refForm" v-model="formdata" label-width="120px">
      <yu-xform-group>
        <yu-xform-item label="应用模块" ctype="input" name="appModule" :rules="appModuleRule" maxlength="20" ></yu-xform-item>
        <yu-xform-item label="应用条线" ctype="input" name="appLine" :rules="appLineRule" maxlength="25" ></yu-xform-item>
        <yu-xform-item label="时效" ctype="input" name="addDay" :rules="addDayRule" maxlength="10"></yu-xform-item>
        <yu-xform-item label="截止时间" ctype="input" name="endTime"  :rules="endTimeRule"></yu-xform-item>
		 <yu-xform-item label="备注" ctype="input" name="remark" maxlength="60"></yu-xform-item>
      </yu-xform-group>
    </yu-xform>
    <div class="yu-grpButton">
      <yu-button v-show="cancelBtnShow" @click="cancelFn">取消</yu-button>
      <yu-button type="primary" v-if="!saveDisabled" @click="saveFn">保存</yu-button>
    </div>
  </yu-dialog>
  <yu-dialog title="管理所属组" :visible.sync="relDialogVisible">
    <!-- <yu-xform related-table-name="refRelTable" form-type="search" v-model="searchFormdata">
      <yu-xform-group :column="4">
        <yu-xform-item label="组名" placeholder="组名" ctype="input" name="rolename"></yu-xform-item>
      </yu-xform-group>
    </yu-xform> -->
    <yu-toolBar>
      <yu-button @click="addRelFn">新增</yu-button>
	  <yu-button @click="updateRelFn">修改</yu-button>
      <yu-button @click="deleteDelFn">删除</yu-button>
	  <yu-button @click="refreshTaskGroup">刷新</yu-button>
    </yu-toolBar>
    <yu-xtable ref="refRelTable" row-number :data-url="relUrl" selection-type="radio"   height="300px">
      <yu-xtable-column label="应用代码" prop="appCode" ></yu-xtable-column>
      <yu-xtable-column label="作业流代码规则" prop="groupCodePattern" ></yu-xtable-column>
      <yu-xtable-column label="备注" prop="remark"></yu-xtable-column>
	   <yu-xtable-column label="更新人" prop="updateUser"></yu-xtable-column>
	    <yu-xtable-column label="更新时间" prop="updateTimeStr"></yu-xtable-column>
    </yu-xtable>
  </yu-dialog>
  <yu-dialog :title="refViewTitle" :visible.sync="addRelDialogVisible">
    <yu-xform ref="addRelForm" v-model="addRelformdata" label-width="120px">
      <yu-xform-group>
        <yu-xform-item label="应用代码" ctype="input" name="appCode" :rules="appCodeRule" maxlength="30"></yu-xform-item>
		<yu-xform-item label="作业流代码规则" ctype="input" name="groupCodePattern" :rules="groupCodePatternRule" maxlength="60"></yu-xform-item>
		<yu-xform-item label="备注" ctype="input" name="remark" maxlength="60" ></yu-xform-item>
      </yu-xform-group>
    </yu-xform>
    <div class="yu-grpButton">
      <yu-button type="primary" @click="saveRelFn">保存</yu-button>
    </div>
  </yu-dialog>

</div>